{#
  @typedef {string[]} tags - An array of tag keys to display.
  @property {string} [className] - A space separated list of classes to apply.
#}
{% macro tagChips(tags, className = '') %}
  <div class="chips {{className}}">
    {% for tagKey in tags or [] %}
      {% if tagKey in collections.tags %}
        {% set tag = collections.tags[tagKey] %}
        <a class="chip" href="{{tag.url}}">{{tag.overrideTitle or tag.title | i18n(locale)}}</a>
      {% endif %}
    {% endfor %}
  </div>
{% endmacro %}
